package com.byq.mm.smartlib.cluster.activity.server;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.byq.mm.smartlib.R;
import com.byq.mm.abstractx.cluster.server.ClusterServer;
import com.byq.mm.smartlib.tools.IconManager;

public class ServerOnoffActivity extends ServerClusterActivity {
	ClusterServer clusterServer;
	Button back;

	@Override
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);

		this.setContentView(R.layout.cluster_server);
		ListView view = (ListView) this.findViewById(R.id.clients);
		
		
		ImageView icon = (ImageView) this.findViewById(R.id.clusterIcon);
		TextView name = (TextView) this.findViewById(R.id.clusterName);
		back = (Button) this.findViewById(R.id.back_cluster_server);

		icon.setImageDrawable(IconManager.getIconDrawable(this, clusterServer.getCluster()));
		int rid = getResources().getIdentifier(clusterServer.getCluster(),  "string",getPackageName());
		name.setText(rid);

		back.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View view) {
				ServerOnoffActivity.this.finish();
			}
		});
	}

}
